package com.fastjars.business.shiro.filter;

import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * WriterUtils
 *
 * @author Brant Liu <br>
 * 邮箱：lbf1988@qq.com <br>
 * 日期：2018/5/9
 * @version 1.0.0
 */
public class WriterUtils {
    public static void write(ServletResponse response, String json) throws IOException {
        response.setContentType("application/json;charset=UTF-8");
        response.getWriter().write(json);
        response.getWriter().flush();
        response.getWriter().close();
    }
}
